package day9;

import java.util.Arrays;
import java.util.Scanner;

public class Demo5 {
    public static void main(String[] args) {
        String s = "This is a Demo 5";
        String[] strs = s.split(" ");
        System.out.println(Arrays.toString(strs));
        String result="";
        for(String str : strs){
            str=str.toLowerCase();
            System.out.println(str);
            result+=str.substring(0,1).toUpperCase()+str.substring(1)+" ";
        }
        System.out.println(result);
    }
}
